/*
 * @Description: Dog
 * @Author: rendc
 * @Date: 2025-08-05 09:12:23
 * @LastEditors: rendc
 * @LastEditTime: 2025-08-05 10:10:14
 */

public class Dog extends Animal {

  private int meekValue;// 忠诚度

  public Dog() {
    super();
  }

  public Dog(String color, int age, int meekValue) {
    // 子类中可以调用父类的全参构造器
    super(color, age);
    this.meekValue = meekValue;
  }

  @Override
  public void eat() {
    System.out.println("狗吃肉，🐶吃🐷");
  }

  @Override
  public void sleep() {
    System.out.println("趴着睡");
  }

  // 重写toString
  @Override
  public String toString() {
    return "Dog 忠诚度：" + meekValue + "," + super.toString();
  }
}